import networkx as nx
import numpy as np

G=nx.DiGraph()
paths=np.array([
    ('a','b',float("inf")),('b','c',6)
])

G.add_weighted_edges_from(paths)
print(G.get_edge_data('a','b'))
res=nx.shortest_path_length(G,source='a')
print(res['b'])